Typically, in software development, a set of tools is used to transform source-code into an executable program. A typical tool set includes a preprocessor, a compiler, an assembler, and a linker. After a developer writes the source code, a preprocessor prepares the code for the compiler. The preparation consists typically of replacing macros by their macro definition, of resolving “include” statements by including other components or of cleaning-out comment lines. Afterwards, a compiler compiles it. The source code is typically made-up of one or more source files written in a higher-level language. The compiler translates these source files into a lower-level language. For example, a C language compiler converts a source file in C language, a high-level language, to assembly language, a lower-level language. Typically, a command to start the compiler includes conditions the compiler uses to process the code.
The assembler then converts the assembly language code into object files. Object files include object code that a computer understands directly. In the final stage of development, the linker links the object files both to each other and to code libraries that contain built-in functions. The result of this linking operation is an executable file.
Typically, compiling larger programs takes much longer than compiling short programs. In most cases, between compilations, only a small section of the source code is actually modified; the rest of the source code remains unchanged. A “make” command tracks which portions of the source code have been changed and compiles only those portions of the source code that have changed since the last compilation.
To effectively use the “make” command, particularly when many source code files are to be combined, a file called a “makefile” is written. The makefile describes the relationships among the constituent files of the program and provides commands for updating each file. The makefile determines the relationships between source files, object files and the executable file. Once a suitable makefile exists, each time the source files change, the “make” command performs all the necessary compilations.